.class Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;
.super Landroid/widget/BaseAdapter;
.source "UserInfoModifyActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "BgGridAdapter"
.end annotation


# instance fields
.field private mColors:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private mMetrics:Landroid/util/DisplayMetrics;

.field final synthetic this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;


# direct methods
.method public constructor <init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/util/List;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 545
    .local p2, "colors":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    iput-object p1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 546
    iput-object p2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mColors:Ljava/util/List;

    .line 547
    # invokes: Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;
    invoke-static {p1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->access$1300(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mMetrics:Landroid/util/DisplayMetrics;

    .line 548
    return-void
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 552
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mColors:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 557
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mColors:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 562
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 13
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    const/4 v8, 0x1

    .line 567
    if-nez p2, :cond_2b

    .line 568
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    # invokes: Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;
    invoke-static {v5}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->access$1400(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;

    move-result-object v5

    const v6, 0x7f030066

    const/4 v7, 0x0

    invoke-static {v5, v6, v7}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 569
    invoke-virtual {p2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v4

    .line 570
    .local v4, "params":Landroid/view/ViewGroup$LayoutParams;
    if-nez v4, :cond_28

    .line 571
    new-instance v4, Landroid/widget/AbsListView$LayoutParams;

    .end local v4    # "params":Landroid/view/ViewGroup$LayoutParams;
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridWidth:I
    invoke-static {v5}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->access$1500(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)I

    move-result v5

    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridWidth:I
    invoke-static {v6}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->access$1500(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)I

    move-result v6

    invoke-direct {v4, v5, v6}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    .line 574
    .restart local v4    # "params":Landroid/view/ViewGroup$LayoutParams;
    :cond_28
    invoke-virtual {p2, v4}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 577
    .end local v4    # "params":Landroid/view/ViewGroup$LayoutParams;
    :cond_2b
    const v5, 0x7f0a0158

    invoke-virtual {p2, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 579
    .local v2, "innerView":Landroid/view/View;
    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mColors:Ljava/util/List;

    invoke-interface {v5, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    # invokes: Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->parseColor(Ljava/lang/String;)I
    invoke-static {v6, v5}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->access$500(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/lang/String;)I

    move-result v0

    .line 582
    .local v0, "color":I
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mColors:Ljava/util/List;

    invoke-interface {v5, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mCurColor:Ljava/lang/String;
    invoke-static {v6}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->access$400(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_67

    .line 583
    invoke-virtual {p2, v0}, Landroid/view/View;->setBackgroundColor(I)V

    .line 584
    const/high16 v5, 0x40000000

    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mMetrics:Landroid/util/DisplayMetrics;

    invoke-static {v8, v5, v6}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v3, v5

    .line 590
    .local v3, "outerPadding":I
    :goto_60
    invoke-virtual {p2, v3, v3, v3, v3}, Landroid/view/View;->setPadding(IIII)V

    .line 591
    invoke-virtual {v2, v0}, Landroid/view/View;->setBackgroundColor(I)V

    .line 593
    return-object p2

    .line 586
    .end local v3    # "outerPadding":I
    :cond_67
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->this$0:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    # invokes: Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;
    invoke-static {v5}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->access$1600(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f08001a

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getColor(I)I

    move-result v1

    .line 587
    .local v1, "defaultBorder":I
    invoke-virtual {p2, v1}, Landroid/view/View;->setBackgroundColor(I)V

    .line 588
    const/high16 v5, 0x3f800000

    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;->mMetrics:Landroid/util/DisplayMetrics;

    invoke-static {v8, v5, v6}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v3, v5

    .restart local v3    # "outerPadding":I
    goto :goto_60
.end method
